package com.wanhe.base.model.holder;


import com.wanhe.base.model.disgn.PageViewModel;

import java.util.HashMap;

/**
 * 菜品数据缓存
 * Created by Administrator on 2016/6/13.
 */
public class ViewPagerTypeHolder extends HashMap<String, PageViewModel> {
    private static ViewPagerTypeHolder ourInstance;

    public synchronized static ViewPagerTypeHolder getInstance() {
        if (ourInstance == null){
            ourInstance = new ViewPagerTypeHolder();
        }
        return ourInstance;
    }

    private ViewPagerTypeHolder() {
    }

    public void release() {
        ourInstance.clear();
        ourInstance = null;
    }
}
